package com.aconcagua.beans {
  import com.aconcagua.factory.BeanFactory;
  
  public class Property extends BeanMetadataSupport implements BeanMetadata {
    public var name: String;

    public function Property(aName: String = null, value: Object = null) {
      super(value);
      name = aName;
    }

    public function registerIn(bean: BeanDefinitionSupport): void {
      bean.addProperty(this);
    }

    public function setTo(beanInstance: Object, factory: BeanFactory): void {
      beanInstance[name] = $valueHolder.getValue(factory);
    }
  }
}